# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-elementpath
pkgver=2.5.3
pkgrel=0
pkgdesc="XPath 1.0/2.0 parsers and selectors for ElementTree and lxml"
url="https://github.com/sissaschool/elementpath"
arch="noarch"
license="MIT"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="$pkgname-$pkgver.tar.gz::https://github.com/sissaschool/elementpath/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/elementpath-$pkgver/"

build() {
	python3 setup.py build
}

check() {
	# disabled tests fails on locale differences
	pytest \
		--deselect tests/test_xpath2_functions.py::XPath2FunctionsTest::test_compare_function \
		--deselect tests/test_xpath30.py::XPath30FunctionsTest::test_compare_function
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
da561446ac3a059c60480084648ebc1190d0ec1dc495dfa128dc2598d5762ae1067f39be36fc6bca466e6785aae80edf6dc1415a2885bfbb2d54b97ca6611572  py3-elementpath-2.5.3.tar.gz
"
